package com.xzh.springCloud.service.impl;

import com.xzh.springCloud.dao.AccountDao;
import com.xzh.springCloud.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: zhiHong
 * @CreateTime: 2023-09-01 9:09
 * @Description:
 */
@Service
@Slf4j
public class AccountServiceImpl implements AccountService {
    @Resource
    private AccountDao accountDao;

    @Override
    public void reduce(Long userId, Integer money) {
        log.info("========seata_account_micro_service-10012 扣减账户余额开始========");
        accountDao.reduce(userId, money);
        log.info("========seata_account_micro_service-10012 扣减账户余额结束========");
    }
}
